import request from '@/utils/request'

const apply = {
  planList(params){
    return request.get('/wcx/declarePlan/list', {params})
  },
  // 根据id获取年度计划详情
  planGet(id){
    return request.get(`/wcx/declarePlan/detail/${id}`)
  },
  // 新增年度计划
  planAdd(data){
    return request.post('/wcx/declarePlan/add',data)
  },
  // 修改年度计划
  planUpdate(data){
    return request.post('/wcx/declarePlan/update', data)
  },
  // 根据id删除年度计划
  planDel(id){
    return request.post(`/wcx/declarePlan/delete/${id}`)
  },
  innovationMy(params){
    return request.get('/wcx/innovations/myDeclareList', {params})
  },
  innovationDel(id){
    return request.post(`/wcx/innovations/delete/${id}`)
  },
  innovationIndex(params){
    return request.get('/wcx/innovations/declareList', {params})
  },
  innovationAdd(data){
    return request.post('/wcx/innovations/add', data);
  },
  innovationUpdate(data){
    return request.post('/wcx/innovations/update', data);
  },
  innovationSubmit(data){
    return request.post('/wcx/innovations/submit', data);
  },
  innovationGet(id){
    return request.get(`/wcx/innovations/detail/${id}`)
  },
  // 单位今年剩余推荐数量
  getRemainingQuota(deptId){
    return request.get(`/wcx/departmentQuota/getRemainingQuota/${deptId}`)
  },
  // 新增成果推荐信息
  recommendInfoAdd(data){
    return request.post(`/wcx/recommendInfo/add`,data)
  },
  // 获取成果推荐详情
  recommendInfoGet(id){
    return request.get(`/wcx/recommendInfo/detail/${id}`)
  },
  // 获取成果推荐详情by
  recommendInfoGetByInnovationId(id){
    return request.get(`/wcx/recommendInfo/getByInnovationId/${id}`)
  },
  // 修改成果推荐
  recommendInfoUpdate(data){
    return request.post(`/wcx/recommendInfo/update`,data)
  },
  // 年度奖项配置列表
  annualAwardsList(params){
    return request.get(`/wcx/annualAwards/list`, {params})
  },
  // 新增年度奖项配置
  annualAwardsAdd(data){
    return request.post(`/wcx/annualAwards/add`,data)
  },
  // 修改年度奖项配置
  annualAwardsUpdate(data){
    return request.post(`/wcx/annualAwards/update`, data)
  },
  // 删除年度奖项配置
  annualAwardsDel(id){
    return request.post(`/wcx/annualAwards/delete/${id}`)
  },
  // 获取年度奖项配置
  annualAwardsGet(id){
    return request.get(`/wcx/annualAwards/detail/${id}`)
  },
  // 获取当前年的已审批通过的成果
  waitAwardsList(params){
    return request.get(`/wcx/innovations/waitAwardsList`,{params})
  },
  // 新增成果获奖情况
  innovationAwardsAdd(data){
    return request.post(`/wcx/innovationAwards/add`, data)
  },
  // 新增成果获奖列表
  innovationAwardsList(params){
    return request.get(`/wcx/innovationAwards/list`, {params})
  },
  // 修改成果获奖情况
  innovationAwardsUpdate(data){
    return request.post(`/wcx/innovationAwards/update`, data)
  },
  // 获取成果获奖情况
  innovationAwardsGet(id){
    return request.get(`/wcx/innovationAwards/getByInnovationId/${id}`)
  },
  // 删除成果获奖情况
  innovationAwardsDel(id){
    return request.post(`/wcx/innovationAwards/delete/${id}`)
  },
  // 公示
  innovationAwardsPublicity(data){
    return request.post(`/wcx/innovationAwards/publicity`, data)
  },
  getThisYearPlan(params){
    return request.get(`/wcx/declarePlan/getThisYearPlan`, {params})
  },
  innovationPdf(id){
    return request.post(`/wcx/innovations/createPdfByWindows/${id}`);
  },
}

export default apply;
